<div id="starRating">
	<div id="aggregate">Rating : <span id="ratingValue"><?php if($ratingsArray[0]['count']!=0){ 
				$avgRat=$ratingsArray[0]['ratings_total']/$ratingsArray[0]['count']; $avgRat=number_format($avgRat, 1);
			}else{ $avgRat=0;
			} echo number_format($avgRat, 1); ?></span></div>
	<div id="ratingCount">Total : <span id="totalCount"><?php echo $ratingsArray[0]['count']; ?></span></div>
	<div style="clear:both;"></div>
	<?php if($rated=='1'){?>
	<ul id="stars">
		<li><img id="1" src="/public/images/star-<?php if($avgRat>0 && $avgRat<1){ echo 'h'; }elseif($avgRat<1){ echo 'b'; }else{ echo 'f';} ?>1.png" /></li>
		<li><img id="2" src="/public/images/star-<?php if($avgRat>1 && $avgRat<2){ echo 'h'; }elseif($avgRat<2){ echo 'b'; }else{ echo 'f';} ?>2.png" /></li>
		<li><img id="3" src="/public/images/star-<?php if($avgRat>2 && $avgRat<3){ echo 'h'; }elseif($avgRat<3){ echo 'b'; }else{ echo 'f';} ?>3.png" /></li>
		<li><img id="4" src="/public/images/star-<?php if($avgRat>3 && $avgRat<4){ echo 'h'; }elseif($avgRat<4){ echo 'b'; }else{ echo 'f';} ?>4.png" /></li>
		<li><img id="5" src="/public/images/star-<?php if($avgRat>4 && $avgRat<5){ echo 'h'; }elseif($avgRat<5){ echo 'b'; }else{ echo 'f';} ?>5.png" /></li>
	</ul>
	<?php }else{?>
	<ul id="stars">
		<li><img id="1" src="/public/images/star-<?php if($avgRat>0 && $avgRat<1){ echo 'h'; }elseif($avgRat<1){ echo 'b'; }else{ echo 'f';} ?>1.png" onmouseover="userRatings(this)" onclick="rateYourEndure(this,'<?php echo $store_id; ?>')" /></li>
		<li><img id="2" src="/public/images/star-<?php if($avgRat>1 && $avgRat<2){ echo 'h'; }elseif($avgRat<2){ echo 'b'; }else{ echo 'f';} ?>2.png" onmouseover="userRatings(this)" onclick="rateYourEndure(this,'<?php echo $store_id; ?>')" /></li>
		<li><img id="3" src="/public/images/star-<?php if($avgRat>2 && $avgRat<3){ echo 'h'; }elseif($avgRat<3){ echo 'b'; }else{ echo 'f';} ?>3.png" onmouseover="userRatings(this)" onclick="rateYourEndure(this,'<?php echo $store_id; ?>')" /></li>
		<li><img id="4" src="/public/images/star-<?php if($avgRat>3 && $avgRat<4){ echo 'h'; }elseif($avgRat<4){ echo 'b'; }else{ echo 'f';} ?>4.png" onmouseover="userRatings(this)" onclick="rateYourEndure(this,'<?php echo $store_id; ?>')" /></li>
		<li><img id="5" src="/public/images/star-<?php if($avgRat>4 && $avgRat<5){ echo 'h'; }elseif($avgRat<5){ echo 'b'; }else{ echo 'f';} ?>5.png" onmouseover="userRatings(this)" onclick="rateYourEndure(this,'<?php echo $store_id; ?>')" /></li>
	</ul>
	<?php }?>
	<div style="clear:both;height:30px;"></div>
</div>